﻿
// RTOC-Data-InterfaceView.h: CRTOCDataInterfaceView 类的接口
//

#pragma once
#include "BtnST.h"

class CRTOCDataInterfaceView : public CFormView
{
protected: // 仅从序列化创建
	CRTOCDataInterfaceView();
	DECLARE_DYNCREATE(CRTOCDataInterfaceView)
public:
	enum { IDD = IDD_MAINVIEW };
	CButtonST m_btTLM;
	CButtonST m_btMASTER;
	CButtonST m_btYQH;
	CButtonST m_btREDIS;
	CButtonST m_btKD;

// 特性
public:
	CRTOCDataInterfaceDoc* GetDocument() const;
	int		m_nTimer;
	CListCtrl m_ctlList;
	int		m_nCurSelRow;
	SINGLE_WELL sw;
	long	m_nTickCount;
	CString m_strOldErrorMsg;

// 操作
public:
	void DrawFrame(CDC *pDC, CRect rtArea);
	void DrawInBorder(CDC* pDC, CRect rt, COLORREF tc = RGB(128, 128, 128), COLORREF bc = RGB(255, 255, 255));
	void FillList(bool bInsert);

// 重写
public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持
	virtual void OnInitialUpdate(); // 构造后第一次调用
// 实现
public:
	virtual ~CRTOCDataInterfaceView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// 生成的消息映射函数
protected:
	afx_msg void OnFilePrintPreview();
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnPaint();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	afx_msg void OnTimer(UINT_PTR nIDEvent);
	afx_msg void OnNMClickList1(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnNMCustomdrawList1(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnNMDblclkList1(NMHDR *pNMHDR, LRESULT *pResult);
};

#ifndef _DEBUG  // RTOC-Data-InterfaceView.cpp 中的调试版本
inline CRTOCDataInterfaceDoc* CRTOCDataInterfaceView::GetDocument() const
   { return reinterpret_cast<CRTOCDataInterfaceDoc*>(m_pDocument); }
#endif

